import request from "@/utils/request";

// 获取车型列表
export function getCarListApi(params) {
  return request({
    url: "/manager/truckType/page",
    method: "GET",
    params,
  });
}
// 新增车型
export function addCarApi(data) {
  return request({
    url: "/truckType",
    method: "POST",
    data,
  });
}
// 编辑车辆信息
export function editCarApi(data) {
  return request({
    url: `/truckType/${data.id}`,
    method: "PUT",
    data,
  });
}
// 获取车辆详情
export function getCarDetails(id) {
  return request({
    url: `/truckType/${id}`,
    method: "GET",
  });
}
// 删除车型
export function delCarApi(id) {
  return request({
    url: `/truckType/${id}`,
    method: "DELETE",
  });
}
// 获取车辆列表
export function getTruckListApi(params) {
  return request({
    url: "/truck/page",
    method: "GET",
    params,
  });
}
